package shapewar.engine.model.abst;

import shapewar.engine.intefac.IRegisterable;

public abstract class Obj implements IRegisterable {
	public int _id;
	public float _x,_y,_rotation;
	public int _depth;
	public int _key;
	
	public Obj(int id,float x,float y,int depth) {
		this._id = id;
		this._x = x;
		this._y = y;
		this._depth = depth;
		this._key = depth * 1000000 + (int)(Math.random()*1000)*1000 + _id;
	}
	
	@Override
	public int getId() {
		return _id;
	}
	@Override
	public void setKey(int key) {
		this._key = key;
	}
	@Override
	public int getKey() {
		return _key;
	}
	@Override
	public int getDepth() {
		return _depth;
	}
}
